1. Field of the Invention
The present invention concerns caching in computer systems and, more particularly, concerns write caching for disk storage devices.
2. Related Art
Processor speeds have grown about sixty percent per year, while electromechanical disk storage devices have improved their access times at a comparatively meager annual rate of about eight percent. At the same time, capacity of disk storage devices has grown more than fifty percent per year, which tends to reduce the amount of data available by parallel, concurrent disk access. By themselves, these trends would dictate that a processor must wait longer for disk read and write operations. Consequently, huge efforts have gone into hiding latency for disk bound computer applications.
A cache has been described by the Storage Networking Industry Association as “A high speed memory or storage device used to reduce the effective time required to read data from or write data to a lower speed memory or device.” Caching is a fundamental technique in hiding I/O latency and is widely used in storage controllers, databases, file systems, and operating systems. A modern storage controller's cache typically contains volatile memory used as a read cache and a non-volatile memory used as a write cache. Non-volatile storage (“NVS”), which is typically fast, but relatively expensive, random access memory, enables writes to be stored quickly and safely in an NVS write cache and destaged, i.e., written to disk storage, later in an asynchronous fashion, which hides the latency of writing to the disk storage, which is slower, but relatively less expensive than the NVS write cache. Read cache management is a well studied discipline and there are a large number of cache replacement algorithms in this context. In contrast, write caching is a relatively less developed subject.
In destaging, a balance must be obtained. Data in the write cache must be destaged quickly enough so that there is always space for incoming writes, but not so quickly that the benefit of the write cache is under utilized. This balance has been addressed, for example, by linear threshold scheduling, in which the rate of destaging is varied in response to instantaneous occupancy of the write cache. It has also been addressed by scheduling using least-cost and high/low “water” marks.
Another issue presented in destaging concerns the destaging order. As long as the write cache is drained fast enough, the precise order in which data is destaged does not affect performance from the standpoint of fairness or of write requests becoming starved because write requests are considered complete, in most respects, once they are written to the write cache. However, destage ordering can crucially affect peak write throughput and performance of concurrent reads. Peak write throughput is affected by destage ordering because the capacity of disks to physically support sequential or nearly sequential write traffic is significantly higher than their capacity to support random writes. That is, destaging writes in an order that exploits this physical fact can significantly improve peak write throughput. This was a fundamental motivation for development of log-structured file systems in a different context. Performance of concurrent reads is affected by destage ordering because to the extent destage ordering improves write performance, it improves read performance. That is, with concurrent reads and writes, the less time spent writing to a disk, the more time there is available to read from the disk.
As may be seen from this brief background, problems are presented in balancing tradeoffs involved in write caching. Problems are presented even regarding how to frame all the issues regarding write caching and in recognizing resultant interactions among the issues.